package com.zhuhao.utils.easyexcel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

// 设置全局列宽为20
@ColumnWidth(20)
// 设置全局内容居中
@ContentStyle(verticalAlignment = VerticalAlignmentEnum.CENTER, horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Goods {

    // @ExcelProperty作用：设置列标题名称
    @ExcelProperty({"零食基本属性", "名称"})
    private String goodsName;

    @ExcelProperty({"零食基本属性", "类型"})
    private String goodsType;

    @ExcelProperty({"相关时间", "生产日期"})
    private String goodsProduceDate;

    @ExcelProperty({"相关时间", "保质期"})
    private String goods2Date;

    @ExcelProperty({"工厂", "核心厂"})
    private String goodsFactoryAddressMain;

    @ExcelProperty({"工厂", "副厂"})
    private String goodsFactoryAddressChild;

}
